package com.atguigu.gulimall.gateway.confg;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
public class Config {
    @Value("${user.name}")
    private String name;
    @Value("${user.age}")
    private Integer age;

    @PostConstruct
    public void afterPropertiesSet() throws Exception {
        System.out.println("==============>" + name);
        System.out.println("==============>" + age);
    }
}
